Skip to content

feat: integrate codelens-watch.py into cmd_watch — debounce, clean output, outline/summary - #4

Merged
Wolfvin merged 1 commit into
mainfrom
feat/integrate-watch-debounce-outline
Jun 11, 2026
Merged

feat: integrate codelens-watch.py into cmd_watch — debounce, clean output, outline/summary#4
Wolfvin merged 1 commit into
mainfrom
feat/integrate-watch-debounce-outline

Conversation

@Wolfvin

@Wolfvin Wolfvin commented Jun 11, 2026

Copy link
Copy Markdown
Owner

Summary

Integrates the concepts from the standalone codelens-watch.py into the existing cmd_watch in codelens.py, then deletes the standalone script.

Changes to cmd_watch

  1. Debounce — Uses threading.Timer with threading.Lock to coalesce rapid file changes. Default 0.5s, configurable via --debounce / -d flag.

  2. Clean terminal output — Replaces raw json.dumps(result, indent=2) with a one-line summary:

    [14:32:15] ✓ 87 files | 312 funcs | 45 classes | 203 nodes | 156 edges | 1 changed
    
  3. Generate outline.json + summary.json — After each scan (initial and incremental), calls get_workspace_outline() from outline_engine.py and writes:

    • .codelens/outline.json — per-file detail
    • .codelens/summary.json — aggregate totals (file count, function count, language breakdown, node/edge counts)
  4. Rewritten _watch_polling — No longer blind polls every 5s. Now tracks file mtimes, detects new/modified/deleted files, and uses the same debounce mechanism.

Deleted

  • codelens-watch.py — all functionality now in python3 skills/codelens/scripts/codelens.py watch <folder>

README updated

  • "Standalone File Watcher" → "Watch Mode (File Watcher)" section
  • Updated project structure (removed codelens-watch.py entry)
  • Updated watch command description in the 39 commands table

Not touched

  • All other 38 commands
  • All parsers and registry format
  • src/lib/, src/app/api/, mini-services/codelens-ws/
  • Only cmd_watch and _watch_polling were modified

…tput, outline/summary

1. Add debounce to cmd_watch using threading.Timer (default 0.5s, --debounce flag)
2. Replace raw JSON output with one-line summary:
   [HH:MM:SS] ✓ 87 files | 312 funcs | 45 classes | 203 nodes | 156 edges
3. Generate outline.json and summary.json to .codelens/ after each scan
   using the existing get_workspace_outline() engine
4. Rewrite _watch_polling with debounce + mtime tracking (no longer blind polling)
5. Add --debounce / -d flag to watch subparser
6. Delete standalone codelens-watch.py (now fully integrated into CLI)
7. Update README: Watch Mode section, project structure, command table

No other commands, parsers, or registry format changed.
@Wolfvin
Wolfvin merged commit 1d97b01 into main Jun 11, 2026
@sonarqubecloud

Copy link
Copy Markdown

@Wolfvin
Wolfvin deleted the feat/integrate-watch-debounce-outline branch June 11, 2026 15:54
Wolfvin pushed a commit that referenced this pull request Jun 11, 2026
Elimination #4: Path-segment-aware ignore matching + Tauri framework support
- utils.py: proper path-segment-aware should_ignore_dir() (fixes substring false positives)
- scan.py: uses new should_ignore_dir() instead of buggy substring check
- framework_detect.py: +Tauri framework detection
- test_path_ignore.py: 259 lines comprehensive path ignore tests
- test_framework_detect.py: framework detection tests
- tailwind_detector.py: improved detection
- Version synced to 5.7.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant